function myInterval(func, delay) {
  function inner() {
    func();
    setTimeout(inner, delay);
  }
  setTimeout(inner, delay);
}
function fn() {
  console.log(11);
}
myInterval(fn, 1000);
